<?php
	$form_bean = array(
		array(
			'field'	=>	'id', 
			'item' 	=>	'hidden'
		),
		array(
			'field'	=>	'parentid',
			'item'	=>	'hidden',
			'value'	=>	0
		),
		array(
			'label'	=>	'所属区域',
			'items'	=>	array(
				array(
					'field'	=>	'parentname',
					'item'	=>	'label',
					'value'	=> 	'无'
				),
				array(
					'field'	=>	'chooseparent',
					'item'	=>	'button',
					'value'	=>	'点击选择',
					'event'	=>	'
						$("#chooseparent").colorbox({href:"'.site_url('/manager/area/area/choice').'/"+document.getElementById("parentid").value+"?m=init",
						onClosed:function(){
							$(".selectBox a").die();
						}});
					'
				)
			)
		),
		array(
			'label' =>	'区域名称',
			'field' =>	'name',
			'item'  =>	'text',
			'rules' =>	'required|chinese|min_length:4|max_length:64|is_exist:'.site_url('/manager/area/area/isExistName'),
			'msg'	=>	'请填写：汉字（2~32个）。'
		),
		array(
			'label' =>	'快捷码',
			'field'	=>	'code',
			'item'	=>	'text',
			'rules'	=>	'required|alpha|min_length:2|max_length:6',
			'msg'	=>	'请填写：快速选择区域码，2~6个英文字母。'
		),
		array(
			'label' =>	'排序',
			'field'	=>	'sort',
			'item'	=>	'text:size=1',
			'rules'	=>	'numeric',
			'msg'	=>	'请填写：数字。'
		),
		array(
			'label'	=>	'',
			'items'	=>	array(
				array(
					'item'	=>	'submit',
					'type'	=>	'ajax',
					'value'	=>	'提交'
				),
				array(
					'item'	=>	'reset',
					'value'	=>	'重置'
				)
			)
		)
	);
?>